package com.dense.kuiniu.floatcabinet.di.module;

import com.dense.kuiniu.floatcabinet.mvp.contract.HomeContract;
import com.dense.kuiniu.floatcabinet.mvp.model.AuthenticationModel;
import com.dense.kuiniu.floatcabinet.mvp.model.BusinessModel;
import com.jess.arms.di.scope.FragmentScope;
import com.jess.arms.integration.IRepositoryManager;

import dagger.Module;
import dagger.Provides;

/**
 * @author Administrator
 * @date 2020/10/29
 */
@Module
public class HomeModule {
    private HomeContract.View view;

    public HomeModule(HomeContract.View view) {
        this.view = view;
    }

    @FragmentScope
    @Provides
    public HomeContract.View provideCategoryView() {
        return view;
    }

    @FragmentScope
    @Provides
    public AuthenticationModel provideCategoryModel(IRepositoryManager repositoryManager) {
        return new AuthenticationModel(repositoryManager);
    }

    @FragmentScope
    @Provides
    public BusinessModel provideBusinessModel(IRepositoryManager repositoryManager) {
        return new BusinessModel(repositoryManager);
    }

}
